/*
 * @Date: 2020-11-27 10:20:42
 * @LastEditors: 小枫
 * @description: email 服务
 * @LastEditTime: 2020-11-27 13:09:02
 * @FilePath: \stu-nest\src\modules\email\email\email.service.ts
 */
import { MailerService } from '@nestjs-modules/mailer';
import { Injectable } from '@nestjs/common';

@Injectable()
export class EmailService {
  constructor(private readonly mailerService: MailerService) {}
  sendEmail(email: string): void {
    this.mailerService.sendMail({
      to: email,
      from: '1984779164@qq.com',
      subject: 'email test',
      template: 'welcome',
      // html: '<h1>Welcome</h1>',
    });
  }
}
